.SUFFIXES: .asm;
OUTFILE = libc.a
OBJS = x86.o math.o sprintf.o string.o longjmp.o setjmp.o
CFLAGS = -g -W -Wall -O2 -nostdinc -Iinclude -fno-builtin
CC = gcc

$(OUTFILE): $(OBJS)
        rm -f $(OUTFILE)
        ar rcs $(OUTFILE) $(OBJS)

.asm.o:
        nasm $*.asm -o $*.o -f elf

clean:
        rm -f $(OUTFILE) $(OBJS)